/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package name.huzhenbo.java.objects;

/**
 *
 *
 */
class CaseInsensitiveString {


    private String string;

    CaseInsensitiveString(String string) {
        this.string = string;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj instanceof CaseInsensitiveString) {
            return string.equals(((CaseInsensitiveString) obj).getString());
        }
        if (obj instanceof String) {
            return string.equals((String) obj);
        }
        return false;
    }

    @Override
    public int hashCode() {
        return string.hashCode();
    }

    public String getString() {
        return string;
    }


}
